﻿using Hu.Core.Domains.Admin.Models;
using Hu.Core.Domains.Admin.Service;
using Microsoft.AspNetCore.Mvc;

namespace Hu.Core.WebManage.Controllers
{
    public class HomeController : Controller
    {
        private readonly HuUserService userService;
        public HomeController(HuUserService userService)
        {
            this.userService = userService;
        }
        public async Task<IActionResult> Index()
        {
            HuUser user = new HuUser
            {
                Email = "163.com",
                Password = "123",
                RealName = "胡胡02",
                UserName = "huhu02"
            };
            await this.userService.AddAsync(user);
            return View();
        }
    }
}
